<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('添加文章')" />
	<th:block th:include="include :: bootstrap-fileinput-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-banner-add">
		<div class="form-group">
			<label class="col-sm-3 control-label">标题：</label>
			<div class="col-sm-8">
				<input name="bannerTitle" class="form-control" type="text">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">富文本编辑：</label>
			<div class="col-sm-8">
				<input name="richText" class="form-control" type="text">
			</div>
		</div>
	</form>
	<div class="form-group">
		<label class="col-sm-3 control-label">封面图片：</label>
		<div class="col-sm-8">
			<input name="file" class="form-control" id="fileinput-demo-1" type="file" multiple data-min-file-count="1">
		</div>
	</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-fileinput-js" />
<script type="text/javascript">
	$(document).ready(function () {
		$("#fileinput-demo-1").fileinput({

			'uploadUrl': '/content/banner/add2',

			initialPreviewAsData: true
		});
	});

	var prefix = ctx + "content/banner"
	$("#form-partner-add").validate({
		focusCleanup: true
	});

	function submitHandler() {
		if ($.validate.form()) {
			$.operate.save(prefix + "/add", $('#form-banner-add').serialize());
		}
	}
</script>
</body>
</html>